const mongoose = require('mongoose');

const Schema = mongoose.Schema;
const chatSchema = new Schema({
    chat_id:{type:String,require:true},
    from:{type:String,require:true},
    to:{type:String,require:true},
    chat:{type:String,require:true,default:''},
    created_time:{type:Number,default:new Date().getTime()},
    read:{type:Boolean,default:false}
})
mongoose.model('chatSchema',chatSchema);